package org.jimmy.tang.designpattern.behavior.chain;

/**
 * @author jimmy
 * 
 */
public class Test {
    public static void main(String[] args) {
        RequestHandle hr = new HRRequestHandle();
        RequestHandle pm = new PMRequestHandle(hr);
        RequestHandle tl = new TLRequestHandle(pm);

        Request request = new DimissionRequest();
        tl.handleRequest(request);

        System.out.println("===========");

        request = new AddMoneyRequest();
        tl.handleRequest(request);

        System.out.println("========");

        request = new DimissionRequest();
        pm.handleRequest(request);

        System.out.println("========");

        request = new LeaveRequest();
        pm.handleRequest(request);
    }

}
